{
/*
* Clamp period to reasonable min/max values:
- * - minimum is 900us, same as timers controlled by vpt.c
+ * - minimum is 100us, same as timers controlled by vpt.c
* - maximum is to prevent overflow in time_after() calculations
*/
- if ( hpet_tick_to_ns(h, new_val) < MICROSECS(900) )
- new_val = (MICROSECS(900) << 10) / h->hpet_to_ns_scale;
+ if ( hpet_tick_to_ns(h, new_val) < MICROSECS(100) )
+ new_val = (MICROSECS(100) << 10) / h->hpet_to_ns_scale;
new_val &= (timer_is_32bit(h, tn) ? ~0u : ~0ull) >> 1;
h->hpet.period[tn] = new_val;
}
pt->do_not_freeze = 0;
pt->irq_issued = 0;
- /* Periodic timer must be at least 0.9ms. */
- if ( (period < 900000) && period )
+ /* Periodic timer must be at least 0.1ms. */
+ if ( (period < 100000) && period )
{
if ( !test_and_set_bool(pt->warned_timeout_too_short) )
gdprintk(XENLOG_WARNING, "HVM_PlatformTime: program too "
"small period %"PRIu64"\n", period);
- period = 900000;
+ period = 100000;
}
pt->period = period;